]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Always hide while the OSK is up
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 12 Feb 2013 19:56:24 +0000 (20:56 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 14 Feb 2013 16:31:32 +0000 (17:31 +0100)
The message tray currently operates in three modes: in the overview,
normal, and while the on-screen keyboard is up. The last case is
particularly odd, and exclusively used for chat-notifications. As
users can still use the Chat application directly on touch-only
devices, the additional mode isn't really justified, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=662687

data/theme/gnome-shell.css
js/ui/messageTray.js

index 599c8425f4d0138804a1da523be4f12b22f96b24..6707dbef2d5bec8bf22cfbd65a9474f8de49f36e 100644 (file)
@@ -1318,11 +1318,6 @@ StScrollBar StButton#vhandle:active {
     height: 72px;
 }
 
-#message-tray:keyboard {
-    /* Same as the OSK */
-    background: rgba(0, 0, 0, 0.8);
-}
-
 #message-tray:overview {
     background: rgba(0, 0, 0, 0.1);
     outline: 1px solid rgba(128, 128, 128, 0.3);
index 4daee88e193e4a670fc76e0f9ee2be46b4b81eea..d4bd7b51e8bec4dd4ad43c0b52e094d8ac941dac 100644 (file)
@@ -1597,7 +1597,6 @@ const MessageTray = new Lang.Class({
         if (Main.panel.statusArea.activities)
             this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
 
-        Main.layoutManager.keyboardBox.connect('notify::hover', Lang.bind(this, this._onKeyboardHoverChanged));
         Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
 
         this._trayState = State.HIDDEN;
@@ -1608,7 +1607,6 @@ const MessageTray = new Lang.Class({
         this._pointerInTray = false;
         this._pointerInKeyboard = false;
         this._keyboardVisible = false;
-        this._keyboardUnderMessageTray = false;
         this._summaryState = State.HIDDEN;
         this._pointerInSummary = false;
         this._notificationClosed = false;
@@ -2103,38 +2101,8 @@ const MessageTray = new Lang.Class({
         }
     },
 
-    _onKeyboardHoverChanged: function(keyboard) {
-        this._pointerInKeyboard = keyboard.hover;
-
-        if (!keyboard.hover) {
-            let event = Clutter.get_current_event();
-            if (event && event.type() == Clutter.EventType.LEAVE) {
-                let into = event.get_related();
-                if (into && this.actor.contains(into)) {
-                    // Don't call _updateState, because pointerInTray is
-                    // still false
-                    return;
-                }
-            }
-        }
-
-        this._updateState();
-    },
-
     _onKeyboardVisibleChanged: function(layoutManager, keyboardVisible) {
-        let keyboardUnderMessageTray = layoutManager.keyboardIndex == layoutManager.bottomIndex;
-        if (this._keyboardVisible == keyboardVisible &&
-            this._keyboardUnderMesssageTray == keyboardUnderMessageTray)
-            return;
-
         this._keyboardVisible = keyboardVisible;
-        this._keyboardUnderMessageTray = keyboardUnderMessageTray;
-
-        if (keyboardVisible && keyboardUnderMessageTray)
-            this.actor.add_style_pseudo_class('keyboard');
-        else
-            this.actor.remove_style_pseudo_class('keyboard');
-
         this._updateState();
     },
 
@@ -2276,7 +2244,8 @@ const MessageTray = new Lang.Class({
         let trayIsVisible = (this._trayState == State.SHOWING ||
                              this._trayState == State.SHOWN);
         let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
-                                   this._summaryState == State.SHOWN);
+                                   this._summaryState == State.SHOWN) &&
+                                  !this._keyboardVisible;
         if (!trayIsVisible && trayShouldBeVisible)
             trayShouldBeVisible = this._showTray();
         else if (trayIsVisible && !trayShouldBeVisible)
@@ -2286,13 +2255,12 @@ const MessageTray = new Lang.Class({
         let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING ||
                                      this._desktopCloneState == State.SHOWN);
         let desktopCloneShouldBeVisible = (trayShouldBeVisible &&
-                                           !this._overviewVisible &&
-                                           (!this._keyboardVisible || !this._keyboardUnderMessageTray));
+                                           !this._overviewVisible);
 
         if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
             this._showDesktopClone();
         } else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
-            this._hideDesktopClone (this._keyboardVisible && this._keyboardUnderMessageTray);
+            this._hideDesktopClone();
         }
     },
 
@@ -2402,10 +2370,10 @@ const MessageTray = new Lang.Class({
             this.actor.remove_style_pseudo_class('overview');
     },
 
-    _hideDesktopClone: function(now) {
+    _hideDesktopClone: function() {
         this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
                     { y: 0,
-                      time: now ? 0 : ANIMATION_TIME,
+                      time: ANIMATION_TIME,
                       transition: 'easeOutQuad',
                       onComplete: Lang.bind(this, function() {
                           this._desktopClone.destroy();